//
//  UIViewController+XUtilExtension.h
//  ViewContrerCategary
//
//  Created by Hongwei Wang on 2019/2/12 .
//  Copyright © 2019 Hongwei Wang. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIViewController (XUtilExtension)
@property (strong, nonatomic, readonly) UINavigationBar *navigationBar;

- (void)pushToViewController:(UIViewController *)vc;

#pragma mark ======= For Normal UIViewController, UITableViewController =======
#pragma mark ======= NotWorking On UINavgationController =======

- (void)leftNavItemClick:(id)sender;
- (void)backNavItemClick:(id)sender;
- (void)rightNavItemClick:(id)sender;

#pragma mark ======= navgation left item =======
- (void)leftItemWithCustomView:(UIView *)view; //view 自身处理相应时间
- (void)leftItemWithTitle:(nullable NSString *)title;
- (void)leftItemWithTitle:(nullable NSString *)title target:(nullable id)target action:(nullable SEL)action;

- (void)leftItemWithImage:(nullable UIImage *)image;
- (void)leftItemWithImage:(nullable UIImage *)image target:(nullable id)target action:(nullable SEL)action;
//landscapeImagePhone will be used for the bar button image when the bar has Compact or Condensed bar metrics.
- (void)leftItemWithImage:(nullable UIImage *)image landscapeImagePhone:(nullable UIImage *)landscapeImagePhone;
- (void)leftItemWithImage:(nullable UIImage *)image landscapeImagePhone:(nullable UIImage *)landscapeImagePhone target:(nullable id)target action:(nullable SEL)action;

- (void)leftItemWithSystemStyle:(UIBarButtonSystemItem)style;
- (void)leftItemWithSystemStyle:(UIBarButtonSystemItem)style target:(nullable id)target action:(nullable SEL)action;

#pragma mark ======= navgation back item =======
- (void)backItemWithCustomView:(UIView *)view; //view 自身处理相应时间
- (void)backItemWithTitle:(nullable NSString *)title;
- (void)backItemWithTitle:(nullable NSString *)title target:(nullable id)target action:(nullable SEL)action;

- (void)backItemWithImage:(nullable UIImage *)image;
- (void)backItemWithImage:(nullable UIImage *)image target:(nullable id)target action:(nullable SEL)action;
//landscapeImagePhone will be used for the bar button image when the bar has Compact or Condensed bar metrics.
- (void)backItemWithImage:(nullable UIImage *)image landscapeImagePhone:(nullable UIImage *)landscapeImagePhone;
- (void)backItemWithImage:(nullable UIImage *)image landscapeImagePhone:(nullable UIImage *)landscapeImagePhone target:(nullable id)target action:(nullable SEL)action;

- (void)backItemWithSystemStyle:(UIBarButtonSystemItem)style;
- (void)backItemWithSystemStyle:(UIBarButtonSystemItem)style target:(nullable id)target action:(nullable SEL)action;

#pragma mark ======= navgation right item =======

- (void)rightItemWithCustomView:(UIView *)view; //view 自身处理相应时间
- (void)rightItemWithTitle:(nullable NSString *)title;
- (void)rightItemWithTitle:(nullable NSString *)title target:(nullable id)target action:(nullable SEL)action;

- (void)rightItemWithImage:(nullable UIImage *)image;
- (void)rightItemWithImage:(nullable UIImage *)image target:(nullable id)target action:(nullable SEL)action;
//landscapeImagePhone will be used for the bar button image when the bar has Compact or Condensed bar metrics.
- (void)rightItemWithImage:(nullable UIImage *)image landscapeImagePhone:(nullable UIImage *)landscapeImagePhone;
- (void)rightItemWithImage:(nullable UIImage *)image landscapeImagePhone:(nullable UIImage *)landscapeImagePhone target:(nullable id)target action:(nullable SEL)action;

- (void)rightItemWithSystemStyle:(UIBarButtonSystemItem)style;
- (void)rightItemWithSystemStyle:(UIBarButtonSystemItem)style target:(nullable id)target action:(nullable SEL)action;

- (void)showModelToast:(nullable NSString *)content;
- (void)showModelToast:(nullable NSString *)content complete:(nullable NoParamBlock)complete;

@end

NS_ASSUME_NONNULL_END
